unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.StdCtrls, REST.Types, REST.Client,
  Data.Bind.Components,
  Data.Bind.ObjectScope;

type
  TForm4 = class(TForm)
    Memo1: TMemo;
    Panel1: TPanel;
    Button1: TButton;
    edtSecretId: TEdit;
    RESTClient1: TRESTClient;
    RESTRequest1: TRESTRequest;
    RESTResponse1: TRESTResponse;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form4: TForm4;

implementation

uses
  COS_Authorization;

{$R *.dfm}

procedure TForm4.Button1Click(Sender: TObject);
var
  SignTime: String;
begin
  SignTime := getSignTime();
  self.Memo1.Lines.Add(genAuth(self.edtSecretId.Text, SignTime, '', ''));

  self.Memo1.Lines.Add(genSignKey('BQYIM75p8x0iWVFSIgqEKwFprpRSVHlz', '1557989151;1557996351'));

end;

end.
